package demo11.gumballstatewinner;

/**
 * 没有投入25分状态
 * */
public class NoQuarterState implements State{
	 GumballMachine gumballMachine;
	 
	    public NoQuarterState(GumballMachine gumballMachine) {
	        this.gumballMachine = gumballMachine;
	    }
	 
		@Override
		public void insertQuarter() {
			System.out.println("你投入了25分");
			gumballMachine.setState(gumballMachine.getHasQuarterState());
		}
	 
		@Override
		public void ejectQuarter() {
			System.out.println("你没有插入 25分");
		}
	 
		@Override
		public void turnCrank() {
			System.out.println("你转动摇杆，但是没有投入25分");
		 }
	 
		@Override
		public void dispense() {
			System.out.println("首先请先投入25分");
		} 
		
		@Override
		public void refill() { }
	 
		@Override
		public String toString() {
			return "等待投入25分";
		}
}
